cmake_minimum_required(VERSION 3.22)
# Enable CMake support for ASM and C languages
enable_language(C ASM)

set(LUA_Include_Dirs
    ${CMAKE_SOURCE_DIR}/Middlewaves/lua/Inc
)

file(GLOB LUA_SRC "${CMAKE_SOURCE_DIR}/Middlewaves/LUA/Src/*.c")

# Interface library for includes and symbols
add_library(LUA INTERFACE)
target_include_directories(LUA INTERFACE ${LUA_Include_Dirs})

# Add LUA generated application sources to the project
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${LUA_SRC})

# Link directories setup
target_link_directories(${CMAKE_PROJECT_NAME} PRIVATE ${LUA_Include_Dirs})
